﻿using Microsoft.Practices.Prism.Commands;
using System.Windows.Controls;

namespace LayoutWindow.Behaviors
{
    public class TreeSelectCommandBehavior:CommandBehaviorBase<TreeView>
    {
        public TreeSelectCommandBehavior(TreeView tree):base(tree)
        {
            tree.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(tree_MouseDoubleClick);
        }

        void tree_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            ExecuteCommand();
        }
    }
}
